package top.ucat.x.system.utils;

import org.springframework.beans.BeanUtils;
import top.ucat.x.system.entity.SysMenu;
import top.ucat.x.system.entity.beans.menu.MenuTreeVo;

/**
 * @Auther: Jun
 * @Date: 2020/4/20 15:51
 * @Description:
 */
public class MenuUtil {

    public static MenuTreeVo getMenuTreeVoBySysMenu(SysMenu sysmenu) {
        MenuTreeVo menuTreeVo = new MenuTreeVo();
        menuTreeVo.setMetaIl8n(sysmenu.getIl8n());
        menuTreeVo.setLabel(sysmenu.getTitle());
        BeanUtils.copyProperties(sysmenu, menuTreeVo);
        return menuTreeVo;
    }
}
